//
//  ZhsJnViewController.m
//  A_HandHeldLOL
//
//  Created by Zhao YanBin on 16/1/22.
//  Copyright © 2016年 zhaoyanbin. All rights reserved.
//

#import "ZhsJnViewController.h"
#import "ZhaohuanshiModel.h"
@interface ZhsJnViewController ()
@property(nonatomic, retain)UIImageView *touxiang;
@property(nonatomic, retain)UILabel *name;
@property(nonatomic, retain)UILabel *jinengshuoming1;
@property(nonatomic, retain)UILabel *jinengshuoming2;
@property(nonatomic, retain)UILabel *lengque1;
@property(nonatomic, retain)UILabel *lengque2;
@property(nonatomic, retain)UILabel *dengji;

@property(nonatomic, retain)NSMutableArray *dataArr;
@end

@implementation ZhsJnViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.title = @"召唤师技能详情";
    //数据处理
    [self data];
    [self jiemian];
    
}


-(void)jiemian
{
    ZhaohuanshiModel *m = _dataArr[self.i];
    self.touxiang = [[UIImageView alloc] init];
    self.touxiang.frame = CGRectMake(0, 64, 100, 100);
    _touxiang.backgroundColor = [UIColor redColor];
    _touxiang.image = [UIImage imageNamed:m.image];

    [self.view addSubview:_touxiang];
    [_touxiang release];
    
    self.name = [[UILabel alloc] initWithFrame:CGRectMake(110, 64, 100, 40)];
    _name.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:_name];
    _name.text = m.name;
    [_name release];
    
    self.jinengshuoming1 = [[UILabel alloc] initWithFrame:CGRectMake(0, 200, 100, 40)];
    _jinengshuoming1.text = @"技能说明";
    [self.view addSubview:_jinengshuoming1];
    [_jinengshuoming1 release];
    
    
    self.jinengshuoming2 = [[UILabel alloc] initWithFrame:CGRectMake(0, 250, self.view.frame.size.width, 200)];
    _jinengshuoming2.backgroundColor = [UIColor blueColor];
    _jinengshuoming2.text = m.shuoming;
    _jinengshuoming2.numberOfLines = 0;
    [self.view addSubview:_jinengshuoming2];
    [_jinengshuoming2 release];
    
    self.lengque1 = [[UILabel alloc] initWithFrame:CGRectMake(0, 450, 50, 30)];
    _lengque1.text = @"冷却:";
    [self.view addSubview:_lengque1];
    [_lengque1 release];
    
    self.lengque2 = [[UILabel alloc] initWithFrame:CGRectMake(50, 450, 50, 30)];
    _lengque2.backgroundColor = [UIColor yellowColor];
    _lengque2.text = m.lengque;
    [self.view addSubview:_lengque2];
    [_lengque2 release];
    
    self.dengji = [[UILabel alloc] initWithFrame:CGRectMake(0, 480, 200, 30)];
    _dengji.backgroundColor = [UIColor grayColor];
    _dengji.text = m.dengji;
    [self.view addSubview:_dengji];
    [_dengji release];
}


-(void)data
{
    NSArray *arr = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Zhaohuanshi" ofType:@"plist"]];
    self.dataArr = [ZhaohuanshiModel modelHanderWithArray:arr];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
